<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .menu>li{
            float: left;
            width: 80px;
            height: 30px;        }
        .show{
            background-color: yellow;
            width: 80px;
            line-height: 30px;
            text-align: center;
            transition: margin-top 0.5s;
        }
        .click{
            background-color: blue;
            width: 80px;
            line-height: 30px;
            text-align: center;
            transition: margin-top 0.5s;
        }
        li{
            list-style: none;
            overflow: hidden;
        }
        .menu>li:hover >.show{
            margin-top: -30px;
        }
    </style>
</head>
<body>
    <ul class="menu">
        <li>
            <p class="show">首页</p>
            <p class="click">首页</p>
        </li>
        <li>
            <p class="show">视频</p>
            <p class="click">视频</p>
        </li>
        <li>
            <p class="show">电影</p>
            <p class="click">电影</p>
        </li>
    </ul>
</body>
</html>